import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index'
import Login from '@/components/login'//登录
import List0 from '@/components/list0'//
import List1 from '@/components/list1'
import List2 from '@/components/list2'
import List3 from '@/components/list3'
import List4 from '@/components/list4'
import NotFound from '@/components/404'
import Axios from 'axios'
Axios.defaults.baseURL = 'https://hbapire.zhongchoujia.com/'
Axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
Vue.prototype.$ajax = Axios

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: {
        name: 'login'
      }
    },
    {
      path: '/index',
      name: 'index',
      component: Index
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/list0',
      name: 'list0',
      component: List0
    },
    {
      path: '/list1',
      name: 'list1',
      component: List1
    },{
      path: '/list2',
      name: 'list2',
      component: List2
    },{
      path: '/list3',
      name: 'list3',
      component: List3
    },{
      path: '/list4',
      name: 'list4',
      component: List4
    },
    {
      path:'*',
      name:'404',
      component:NotFound,
    }
  ]
})
